package com.red.springmanual.springscan;

import com.red.springmanual.usespring.AppConfig;
import com.red.springmanual.usespring.UserServiceInterface;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Test {

    /**
     *
     * @link AbstractApplicationContext
     *
     *
     *
     * @param args
     */
    public static void main(String[] args) {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);

        // bean 对象
        UserServiceInterface userService = (UserServiceInterface)applicationContext.getBean("userService");
        System.out.println(userService);
        userService.test();
//        LockSupport.park();
    }
}
